#include "trap.h"
   .set noat
   .globl main
   .text
main:
    # beq
    li $at, 0x7fffffff
    or $t0, $at, $zero
    beq $t0, $at, point1
    lui $t1, 0xabcd
    # bne
point1: 
    lui $t1, 0x1111
    bne $t0, $t1, point3
    lui $t1, 0xabcd 
    # bgez
point2: 
    lui $t1, 0x3333
    bgez $t0, point4
    lui $t1, 0xabcd 
    # j
point3: 
    lui $t1, 0x2222
    j point2
    lui $t1, 0xabcd
    # bgtz
point4: 
    lui $t1, 0x4444
    addi $at, $zero, 0x1111  # $at == 0x11111111
    bgtz $at, point6
    lui $t1, 0xabcd
    # blez
point5: 
    lui $t1, 0x6666
    blez $zero, point8
    lui $t1, 0xabcd 
    # jal
point6: 
    lui $t1, 0x5555
    jal point5
    lui $t1, 0xabcd 
    # bltz 
point7: 
    lui $t1, 0x8888
    lui $at, 0xffff # $at == 0xffff0000
    bltz $at, pointa
    lui $t1, 0xabcd 
    # jr
point8: 
    lui $t1, 0x7777
    la $t2, point7 
    jr $t2
    lui $t1, 0xabcd 
    # bgezal
point9: 
    lui $t1, 0xbbbb
    bgezal $zero, end
    lui $t1, 0xabcd 
    # jalr
pointa: 
    lui $t1, 0x9999
    la $t2, pointb
    jalr $t2
    lui $t1, 0xabcd 
    # bltzal
pointb: 
    lui $t1, 0xaaaa
    bltzal $at, point9
    lui $t1, 0xabcd 
end:
    li $t1, 0x12345678 
    HIT_GOOD_TRAP		# stop temu